<template>
    <nav>
        <a-menu mode="vertical" theme="light" :defaultSelectedKeys="defaultSelectedKeys" v-model="NavSelectedKeys" @click="menuClick">
            <a-menu-item key="/personalSettings">
                <i class="iconfont icon-shezhi"></i> 个人设置
            </a-menu-item>
            <a-menu-item key="/myCollection">
                <i class="iconfont icon-xin1"></i> 我的收藏
            </a-menu-item>
            <!--<a-menu-item key="/myHouseReport">-->
                <!--<i class="iconfont icon-xiazai"></i> 我的房产报告-->
            <!--</a-menu-item>-->
            <!--<a-menu-item key="/orderManagement">-->
                <!--<i class="iconfont icon-dingdanguanli"></i> 订单管理-->
            <!--</a-menu-item>-->
        </a-menu>
    </nav>
</template>

<script>
    export default {
        data() {
            return {
                defaultSelectedKeys: ['/personalSettings'],
                NavSelectedKeys: [this.$route.path.substr(this.$route.path.lastIndexOf('/'))],
            }
        },
        created() {
        },
        mounted() {
        },
        computed: {},
        methods: {
            //菜单栏点击跳转路由
            menuClick({ item, key, keyPath }){
                // console.log({ item, key, keyPath })
                this.$router.push( key );
            }

        },
        components: {}
    }
</script>

<style scoped lang="less" type="text/less">
    body{
        nav{

        }
    }
</style>
